// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file RemoteControllerState.h
 * This header file contains the declaration of the described types in the IDL
 * file.
 *
 * This file was generated by the tool fastddsgen.
 */

#ifndef _FAST_DDS_GENERATED_BOOSTER_INTERFACE_MSG_REMOTECONTROLLERSTATE_H_
#define _FAST_DDS_GENERATED_BOOSTER_INTERFACE_MSG_REMOTECONTROLLERSTATE_H_

#include <array>
#include <bitset>
#include <cstdint>
#include <fastcdr/cdr/fixed_size_string.hpp>
#include <fastcdr/xcdr/external.hpp>
#include <fastcdr/xcdr/optional.hpp>
#include <map>
#include <string>
#include <vector>

// ------------------------------ Pub Sub Type Start
// ----------------------------
#include <fastdds/rtps/common/InstanceHandle.h>
#include <fastdds/rtps/common/SerializedPayload.h>
#include <fastrtps/utils/md5.h>

#include <fastdds/dds/core/policy/QosPolicies.hpp>
#include <fastdds/dds/topic/TopicDataType.hpp>

#if !defined(GEN_API_VER) || (GEN_API_VER != 2)
#error \
    Generated RemoteControllerState is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen.
#endif  // GEN_API_VER

// ------------------------------ Pub Sub Type End ----------------------------

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec(dllexport)
#else
#define eProsima_user_DllExport
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define eProsima_user_DllExport
#endif  // _WIN32

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#if defined(REMOTECONTROLLERSTATE_SOURCE)
#define REMOTECONTROLLERSTATE_DllAPI __declspec(dllexport)
#else
#define REMOTECONTROLLERSTATE_DllAPI __declspec(dllimport)
#endif  // REMOTECONTROLLERSTATE_SOURCE
#else
#define REMOTECONTROLLERSTATE_DllAPI
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define REMOTECONTROLLERSTATE_DllAPI
#endif  // _WIN32

namespace eprosima {
namespace fastcdr {
class Cdr;
class CdrSizeCalculator;
}  // namespace fastcdr
}  // namespace eprosima

namespace booster_interface {

namespace msg {

/*!
 * @brief This class represents the structure RemoteControllerState defined by
 * the user in the IDL file.
 * @ingroup RemoteControllerState
 */
class RemoteControllerState : public eprosima::fastdds::dds::TopicDataType {
 public:
  /*!
   * @brief Copy constructor.
   * @param x Reference to the object
   * booster_interface::msg::RemoteControllerState that will be copied.
   */
  eProsima_user_DllExport RemoteControllerState(const RemoteControllerState& x);

  /*!
   * @brief Move constructor.
   * @param x Reference to the object
   * booster_interface::msg::RemoteControllerState that will be copied.
   */
  eProsima_user_DllExport RemoteControllerState(
      RemoteControllerState&& x) noexcept;

  /*!
   * @brief Copy assignment.
   * @param x Reference to the object
   * booster_interface::msg::RemoteControllerState that will be copied.
   */
  eProsima_user_DllExport RemoteControllerState& operator=(
      const RemoteControllerState& x);

  /*!
   * @brief Move assignment.
   * @param x Reference to the object
   * booster_interface::msg::RemoteControllerState that will be copied.
   */
  eProsima_user_DllExport RemoteControllerState& operator=(
      RemoteControllerState&& x) noexcept;

  /*!
   * @brief Comparison operator.
   * @param x booster_interface::msg::RemoteControllerState object to compare.
   */
  eProsima_user_DllExport bool operator==(const RemoteControllerState& x) const;

  /*!
   * @brief Comparison operator.
   * @param x booster_interface::msg::RemoteControllerState object to compare.
   */
  eProsima_user_DllExport bool operator!=(const RemoteControllerState& x) const;

  /*!
   * @brief This function sets a value in member event
   * @param _event New value for member event
   */
  eProsima_user_DllExport void event(uint32_t _event);

  /*!
   * @brief This function returns the value of member event
   * @return Value of member event
   */
  eProsima_user_DllExport uint32_t event() const;

  /*!
   * @brief This function returns a reference to member event
   * @return Reference to member event
   */
  eProsima_user_DllExport uint32_t& event();

  /*!
   * @brief This function sets a value in member lx
   * @param _lx New value for member lx
   */
  eProsima_user_DllExport void lx(float _lx);

  /*!
   * @brief This function returns the value of member lx
   * @return Value of member lx
   */
  eProsima_user_DllExport float lx() const;

  /*!
   * @brief This function returns a reference to member lx
   * @return Reference to member lx
   */
  eProsima_user_DllExport float& lx();

  /*!
   * @brief This function sets a value in member ly
   * @param _ly New value for member ly
   */
  eProsima_user_DllExport void ly(float _ly);

  /*!
   * @brief This function returns the value of member ly
   * @return Value of member ly
   */
  eProsima_user_DllExport float ly() const;

  /*!
   * @brief This function returns a reference to member ly
   * @return Reference to member ly
   */
  eProsima_user_DllExport float& ly();

  /*!
   * @brief This function sets a value in member rx
   * @param _rx New value for member rx
   */
  eProsima_user_DllExport void rx(float _rx);

  /*!
   * @brief This function returns the value of member rx
   * @return Value of member rx
   */
  eProsima_user_DllExport float rx() const;

  /*!
   * @brief This function returns a reference to member rx
   * @return Reference to member rx
   */
  eProsima_user_DllExport float& rx();

  /*!
   * @brief This function sets a value in member ry
   * @param _ry New value for member ry
   */
  eProsima_user_DllExport void ry(float _ry);

  /*!
   * @brief This function returns the value of member ry
   * @return Value of member ry
   */
  eProsima_user_DllExport float ry() const;

  /*!
   * @brief This function returns a reference to member ry
   * @return Reference to member ry
   */
  eProsima_user_DllExport float& ry();

  /*!
   * @brief This function sets a value in member a
   * @param _a New value for member a
   */
  eProsima_user_DllExport void a(bool _a);

  /*!
   * @brief This function returns the value of member a
   * @return Value of member a
   */
  eProsima_user_DllExport bool a() const;

  /*!
   * @brief This function returns a reference to member a
   * @return Reference to member a
   */
  eProsima_user_DllExport bool& a();

  /*!
   * @brief This function sets a value in member b
   * @param _b New value for member b
   */
  eProsima_user_DllExport void b(bool _b);

  /*!
   * @brief This function returns the value of member b
   * @return Value of member b
   */
  eProsima_user_DllExport bool b() const;

  /*!
   * @brief This function returns a reference to member b
   * @return Reference to member b
   */
  eProsima_user_DllExport bool& b();

  /*!
   * @brief This function sets a value in member x
   * @param _x New value for member x
   */
  eProsima_user_DllExport void x(bool _x);

  /*!
   * @brief This function returns the value of member x
   * @return Value of member x
   */
  eProsima_user_DllExport bool x() const;

  /*!
   * @brief This function returns a reference to member x
   * @return Reference to member x
   */
  eProsima_user_DllExport bool& x();

  /*!
   * @brief This function sets a value in member y
   * @param _y New value for member y
   */
  eProsima_user_DllExport void y(bool _y);

  /*!
   * @brief This function returns the value of member y
   * @return Value of member y
   */
  eProsima_user_DllExport bool y() const;

  /*!
   * @brief This function returns a reference to member y
   * @return Reference to member y
   */
  eProsima_user_DllExport bool& y();

  /*!
   * @brief This function sets a value in member lb
   * @param _lb New value for member lb
   */
  eProsima_user_DllExport void lb(bool _lb);

  /*!
   * @brief This function returns the value of member lb
   * @return Value of member lb
   */
  eProsima_user_DllExport bool lb() const;

  /*!
   * @brief This function returns a reference to member lb
   * @return Reference to member lb
   */
  eProsima_user_DllExport bool& lb();

  /*!
   * @brief This function sets a value in member rb
   * @param _rb New value for member rb
   */
  eProsima_user_DllExport void rb(bool _rb);

  /*!
   * @brief This function returns the value of member rb
   * @return Value of member rb
   */
  eProsima_user_DllExport bool rb() const;

  /*!
   * @brief This function returns a reference to member rb
   * @return Reference to member rb
   */
  eProsima_user_DllExport bool& rb();

  /*!
   * @brief This function sets a value in member lt
   * @param _lt New value for member lt
   */
  eProsima_user_DllExport void lt(bool _lt);

  /*!
   * @brief This function returns the value of member lt
   * @return Value of member lt
   */
  eProsima_user_DllExport bool lt() const;

  /*!
   * @brief This function returns a reference to member lt
   * @return Reference to member lt
   */
  eProsima_user_DllExport bool& lt();

  /*!
   * @brief This function sets a value in member rt
   * @param _rt New value for member rt
   */
  eProsima_user_DllExport void rt(bool _rt);

  /*!
   * @brief This function returns the value of member rt
   * @return Value of member rt
   */
  eProsima_user_DllExport bool rt() const;

  /*!
   * @brief This function returns a reference to member rt
   * @return Reference to member rt
   */
  eProsima_user_DllExport bool& rt();

  /*!
   * @brief This function sets a value in member ls
   * @param _ls New value for member ls
   */
  eProsima_user_DllExport void ls(bool _ls);

  /*!
   * @brief This function returns the value of member ls
   * @return Value of member ls
   */
  eProsima_user_DllExport bool ls() const;

  /*!
   * @brief This function returns a reference to member ls
   * @return Reference to member ls
   */
  eProsima_user_DllExport bool& ls();

  /*!
   * @brief This function sets a value in member rs
   * @param _rs New value for member rs
   */
  eProsima_user_DllExport void rs(bool _rs);

  /*!
   * @brief This function returns the value of member rs
   * @return Value of member rs
   */
  eProsima_user_DllExport bool rs() const;

  /*!
   * @brief This function returns a reference to member rs
   * @return Reference to member rs
   */
  eProsima_user_DllExport bool& rs();

  /*!
   * @brief This function sets a value in member back
   * @param _back New value for member back
   */
  eProsima_user_DllExport void back(bool _back);

  /*!
   * @brief This function returns the value of member back
   * @return Value of member back
   */
  eProsima_user_DllExport bool back() const;

  /*!
   * @brief This function returns a reference to member back
   * @return Reference to member back
   */
  eProsima_user_DllExport bool& back();

  /*!
   * @brief This function sets a value in member start
   * @param _start New value for member start
   */
  eProsima_user_DllExport void start(bool _start);

  /*!
   * @brief This function returns the value of member start
   * @return Value of member start
   */
  eProsima_user_DllExport bool start() const;

  /*!
   * @brief This function returns a reference to member start
   * @return Reference to member start
   */
  eProsima_user_DllExport bool& start();

  /*!
   * @brief This function sets a value in member hat_c
   * @param _hat_c New value for member hat_c
   */
  eProsima_user_DllExport void hat_c(bool _hat_c);

  /*!
   * @brief This function returns the value of member hat_c
   * @return Value of member hat_c
   */
  eProsima_user_DllExport bool hat_c() const;

  /*!
   * @brief This function returns a reference to member hat_c
   * @return Reference to member hat_c
   */
  eProsima_user_DllExport bool& hat_c();

  /*!
   * @brief This function sets a value in member hat_u
   * @param _hat_u New value for member hat_u
   */
  eProsima_user_DllExport void hat_u(bool _hat_u);

  /*!
   * @brief This function returns the value of member hat_u
   * @return Value of member hat_u
   */
  eProsima_user_DllExport bool hat_u() const;

  /*!
   * @brief This function returns a reference to member hat_u
   * @return Reference to member hat_u
   */
  eProsima_user_DllExport bool& hat_u();

  /*!
   * @brief This function sets a value in member hat_d
   * @param _hat_d New value for member hat_d
   */
  eProsima_user_DllExport void hat_d(bool _hat_d);

  /*!
   * @brief This function returns the value of member hat_d
   * @return Value of member hat_d
   */
  eProsima_user_DllExport bool hat_d() const;

  /*!
   * @brief This function returns a reference to member hat_d
   * @return Reference to member hat_d
   */
  eProsima_user_DllExport bool& hat_d();

  /*!
   * @brief This function sets a value in member hat_l
   * @param _hat_l New value for member hat_l
   */
  eProsima_user_DllExport void hat_l(bool _hat_l);

  /*!
   * @brief This function returns the value of member hat_l
   * @return Value of member hat_l
   */
  eProsima_user_DllExport bool hat_l() const;

  /*!
   * @brief This function returns a reference to member hat_l
   * @return Reference to member hat_l
   */
  eProsima_user_DllExport bool& hat_l();

  /*!
   * @brief This function sets a value in member hat_r
   * @param _hat_r New value for member hat_r
   */
  eProsima_user_DllExport void hat_r(bool _hat_r);

  /*!
   * @brief This function returns the value of member hat_r
   * @return Value of member hat_r
   */
  eProsima_user_DllExport bool hat_r() const;

  /*!
   * @brief This function returns a reference to member hat_r
   * @return Reference to member hat_r
   */
  eProsima_user_DllExport bool& hat_r();

  /*!
   * @brief This function sets a value in member hat_lu
   * @param _hat_lu New value for member hat_lu
   */
  eProsima_user_DllExport void hat_lu(bool _hat_lu);

  /*!
   * @brief This function returns the value of member hat_lu
   * @return Value of member hat_lu
   */
  eProsima_user_DllExport bool hat_lu() const;

  /*!
   * @brief This function returns a reference to member hat_lu
   * @return Reference to member hat_lu
   */
  eProsima_user_DllExport bool& hat_lu();

  /*!
   * @brief This function sets a value in member hat_ld
   * @param _hat_ld New value for member hat_ld
   */
  eProsima_user_DllExport void hat_ld(bool _hat_ld);

  /*!
   * @brief This function returns the value of member hat_ld
   * @return Value of member hat_ld
   */
  eProsima_user_DllExport bool hat_ld() const;

  /*!
   * @brief This function returns a reference to member hat_ld
   * @return Reference to member hat_ld
   */
  eProsima_user_DllExport bool& hat_ld();

  /*!
   * @brief This function sets a value in member hat_ru
   * @param _hat_ru New value for member hat_ru
   */
  eProsima_user_DllExport void hat_ru(bool _hat_ru);

  /*!
   * @brief This function returns the value of member hat_ru
   * @return Value of member hat_ru
   */
  eProsima_user_DllExport bool hat_ru() const;

  /*!
   * @brief This function returns a reference to member hat_ru
   * @return Reference to member hat_ru
   */
  eProsima_user_DllExport bool& hat_ru();

  /*!
   * @brief This function sets a value in member hat_rd
   * @param _hat_rd New value for member hat_rd
   */
  eProsima_user_DllExport void hat_rd(bool _hat_rd);

  /*!
   * @brief This function returns the value of member hat_rd
   * @return Value of member hat_rd
   */
  eProsima_user_DllExport bool hat_rd() const;

  /*!
   * @brief This function returns a reference to member hat_rd
   * @return Reference to member hat_rd
   */
  eProsima_user_DllExport bool& hat_rd();

  /*!
   * @brief This function sets a value in member reserved
   * @param _reserved New value for member reserved
   */
  eProsima_user_DllExport void reserved(uint8_t _reserved);

  /*!
   * @brief This function returns the value of member reserved
   * @return Value of member reserved
   */
  eProsima_user_DllExport uint8_t reserved() const;

  /*!
   * @brief This function returns a reference to member reserved
   * @return Reference to member reserved
   */
  eProsima_user_DllExport uint8_t& reserved();

 private:
  uint32_t m_event{0};
  float m_lx{0.0};
  float m_ly{0.0};
  float m_rx{0.0};
  float m_ry{0.0};
  bool m_a{false};
  bool m_b{false};
  bool m_x{false};
  bool m_y{false};
  bool m_lb{false};
  bool m_rb{false};
  bool m_lt{false};
  bool m_rt{false};
  bool m_ls{false};
  bool m_rs{false};
  bool m_back{false};
  bool m_start{false};
  bool m_hat_c{false};
  bool m_hat_u{false};
  bool m_hat_d{false};
  bool m_hat_l{false};
  bool m_hat_r{false};
  bool m_hat_lu{false};
  bool m_hat_ld{false};
  bool m_hat_ru{false};
  bool m_hat_rd{false};
  uint8_t m_reserved{0};

 public:
  typedef RemoteControllerState type;

  eProsima_user_DllExport RemoteControllerState();

  eProsima_user_DllExport ~RemoteControllerState() override;

  eProsima_user_DllExport bool serialize(
      void* data,
      eprosima::fastrtps::rtps::SerializedPayload_t* payload) override {
    return serialize(data, payload,
                     eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION);
  }

  eProsima_user_DllExport bool serialize(
      void* data, eprosima::fastrtps::rtps::SerializedPayload_t* payload,
      eprosima::fastdds::dds::DataRepresentationId_t data_representation)
      override;

  eProsima_user_DllExport bool deserialize(
      eprosima::fastrtps::rtps::SerializedPayload_t* payload,
      void* data) override;

  eProsima_user_DllExport std::function<uint32_t()> getSerializedSizeProvider(
      void* data) override {
    return getSerializedSizeProvider(
        data, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION);
  }

  eProsima_user_DllExport std::function<uint32_t()> getSerializedSizeProvider(
      void* data,
      eprosima::fastdds::dds::DataRepresentationId_t data_representation)
      override;

  eProsima_user_DllExport bool getKey(
      void* data, eprosima::fastrtps::rtps::InstanceHandle_t* ihandle,
      bool force_md5 = false) override;

  eProsima_user_DllExport void* createData() override;

  eProsima_user_DllExport void deleteData(void* data) override;

#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
  eProsima_user_DllExport inline bool is_bounded() const override {
    return true;
  }

#endif  // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED

#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
  eProsima_user_DllExport inline bool is_plain() const override {
    return false;
  }

  eProsima_user_DllExport inline bool is_plain(
      eprosima::fastdds::dds::DataRepresentationId_t data_representation)
      const override {
    static_cast<void>(data_representation);
    return false;
  }

#endif  // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN

#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
  eProsima_user_DllExport inline bool construct_sample(
      void* memory) const override {
    static_cast<void>(memory);
    return false;
  }

#endif  // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE

  MD5 m_md5;
  unsigned char* m_keyBuffer;
};

}  // namespace msg

}  // namespace booster_interface

#endif  // _FAST_DDS_GENERATED_BOOSTER_INTERFACE_MSG_REMOTECONTROLLERSTATE_H_
